package parttern.state;

public class Context {
    private State state;

    public Context() {
        state = null;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }


    ///test
    public static void main(String[] args) {
        Context context = new Context();

        PlayState playState = new PlayState();
        playState.doAction(context);

        context.getState().showState();

        StopState stopState = new StopState();
        stopState.doAction(context);

        context.getState().showState();
    }
}
